﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ShadowGame
{
    public class Door : GameComponent
    {
        private Texture2D doorTexture;

        public Door(Game game) : base(null)
        {
            doorTexture = game.Content.Load<Texture2D>(@"Images/CastleDoor");
            animations.Add("idle", new Animation(doorTexture, 256, 256, new Rectangle(0, 0, 256, 256), 1, "idle"));

            animations["idle"].LoopAnimation = true;
            animations["idle"].FrameLength = 0.5f;

            frameWidth = 256;
            frameHeight = 256;
            drawDepth = 0.825f;
            enabled = true;
            PlayAnimation("idle");
            CollisionRectangle = new Rectangle(0, 0, 256, 256);
        }
    }
}
